from django.db import models

__all__ = ("DepartmentGroup", "Department_Mode")


class DepartmentGroup(models.Model):
    """ 部门组模型 """
    department_groups_name = models.CharField(max_length=64, blank=True, null=True, verbose_name='组名')
    description = models.TextField(verbose_name="介绍", blank=True, null=True, )

    def __str__(self):
        return self.department_groups_name

    class Meta:
        verbose_name = "部门组"
        verbose_name_plural = verbose_name


class Department_Mode(models.Model):
    """ 部门模型 """
    AUTH_GID = [(1001, "运维部"), (1002, "架构"), (1003, "研发"), (1004, "测试")]

    department_name = models.CharField(max_length=64, blank=True, null=True, verbose_name='部门名称')
    description = models.TextField(verbose_name="介绍", blank=True, null=True, )
    desc_gid = models.IntegerField(verbose_name="部门组", choices=AUTH_GID, blank=True, null=True, )

    def __str__(self):
        return self.department_name

    class Meta:
        verbose_name = "部门"
        verbose_name_plural = verbose_name
